home *** CD-ROM | disk | FTP | other *** search
/ Photography Workshop / PhotoWorkShop.iso / pc / Content / Book / Book.cst / 00001_Book Script.ls next >
Encoding:
Text File  |  2002-04-11  |  1.2 KB  |  47 lines

  1. property ancestor
  2. property lastpageDisplay
  3.  
  4. global lastpage
  5. global pages
  6. global Navigator
  7.  
  8. on Birth me, theChannelObject, theName, thePageInfo
  9.   set the ancestor of me to Birth( script "Master Page Template", theChannelObject, theName, thePageInfo, true, true )
  10.   
  11.   Show me
  12.   UpdateHistory me
  13.   
  14.   set theRollovers to FindButton( me, "Bookmark" )
  15.   SetInk( theRollovers, #Transparent )
  16.   return me
  17. end
  18.  
  19.  
  20. on UpdateHistory me
  21.   repeat with thisPageInfo in pages
  22.     set DisplayName to getprop( thisPageInfo, #shortname )
  23.     set thisDisplay to FindDisplay( me, DisplayName )
  24.     --put "looking at page" && #shortname && DisplayName && thisDisplay
  25.     if not ( thisDisplay = 0 ) then      
  26.       Hide( thisDisplay, Point(-1000,-1000) )
  27.       setink( thisDisplay, #Transparent )
  28.       if getprop( thisPageInfo, #haveSeen ) = #Seen then
  29.         if ( not ( thisDisplay = me ) ) then
  30.           --put "been to page" && DisplayName
  31.           Show( thisDisplay )
  32.         end if
  33.       end if
  34.     else
  35.       --put "no display for" && DisplayName
  36.     end if
  37.   end repeat
  38. end
  39.  
  40. on ChangePage me, theElementID, theValue1, theValue2
  41.   ChangePage( the ancestor of me, theElementID, theValue1, theValue2 )
  42.   case theElementID of
  43.     #Clear:
  44.       ClearHistory
  45.       UpdateHistory me
  46.   end case
  47. end